package com.itheima.text2;

public class Text2 {
    public static void main(String[] args) {
        useShowHandler(new ShowHandler() {
            @Override
            public void show() {
                System.out.println("匿名内部类的show方法");
            }
        });
        useShowHandler(()->System.out.println("匿名内部类的lambda方法"));
    }

    public static void useShowHandler(ShowHandler sh){
        sh.show();
    }
}

interface ShowHandler{
    void show();
}